
#include "groupController.h"
#include "enemies.h"

struct groupmember_node
{
	Enemy *enemy;
	int alive;
	int isLeader;
} groupmember[10];



void groupCreate(int enemyType)
{
	int i;
	for(i=0; i<10; i++)
	{
		groupmember[i].enemy = enemyGetNew(enemyType);
		groupmember[i].enemy->x = i*50.0f + 50.0f;
		groupmember[i].enemy->y = -40.0f;
		groupmember[i].alive = 1;
		groupmember[i].isLeader = 0;
	}
}

void groupUpdate()
{
	int i;
	for(i=0; i<10; i++)
	{
		if(groupmember[i].alive)
		{
			if(groupmember[i].enemy->currentMode==ENEMY_MODE_VANISHED)
			{
				groupmember[i].alive = 0;
			}
			else
			{
				groupmember[i].enemy->y += 0.3f;
			}
		}
	}
}
